﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using Padelcenter.Common;
using Padelcenter.DataAccess;

namespace Padelcenter.BusinessLogic.Insert
{
    public class InsertMetodoPago : IBusinessLogic
    {
        public InsertMetodoPago() { }

        public void Invoke()
        {
            MetodoPago_Insert oMetodoPagoInsert = new MetodoPago_Insert();
            oMetodoPagoInsert.MetodoPago = this.MetodoPago;
            this.Resultset = oMetodoPagoInsert.Get();
        }

        public void Add()
        {
            this.Invoke();
            int idInserted = 0;
            if (this.Resultset.Tables[0].Rows.Count > 0)
            {
                idInserted = Convert.ToInt32(this.Resultset.Tables[0].Rows[0][0]);
            }

            this.MetodoPago.IdMetodoPago = idInserted;
        }

        private DataSet _resultset;
        private MetodoPago _metodoPago;

        public MetodoPago MetodoPago
        {
            get { return _metodoPago; }
            set { _metodoPago = value; }
        }

        public DataSet Resultset
        {
            get { return _resultset; }
            set { _resultset = value; }
        }
    }

    public class InsertMetodoPagoDescripcion : IBusinessLogic
    {
        public InsertMetodoPagoDescripcion() { }

        public void Invoke()
        {
            MetodoPagoDescripcion_Insert oMetodoPagoDescripcionInsert = new MetodoPagoDescripcion_Insert();
            oMetodoPagoDescripcionInsert.MetodoPagoDescripcion = this.MetodoPagoDescripcion;
            this.Resultset = oMetodoPagoDescripcionInsert.Get();
        }

        public void Add()
        {
            this.Invoke();
            int idInserted = 0;
            if (this.Resultset.Tables[0].Rows.Count > 0)
            {
                idInserted = Convert.ToInt32(this.Resultset.Tables[0].Rows[0][0]);
            }
        }

        private DataSet _resultset;
        private MetodoPagoDescripcion _metodoPagoDescripcion;

        public MetodoPagoDescripcion MetodoPagoDescripcion
        {
            get { return _metodoPagoDescripcion; }
            set { _metodoPagoDescripcion = value; }
        }

        public DataSet Resultset
        {
            get { return _resultset; }
            set { _resultset = value; }
        }
    }

    public class InsertMetodoPagoZona : IBusinessLogic
    {
        public InsertMetodoPagoZona() { }

        public void Invoke()
        {
            MetodoPagoZona_Insert oMetodoPagoZonaInsert = new MetodoPagoZona_Insert();
            oMetodoPagoZonaInsert.MetodoPagoZona = this.MetodoPagoZona;
            this.Resultset = oMetodoPagoZonaInsert.Get();
        }

        public void Add()
        {
            this.Invoke();
            int idInserted = 0;
            if (this.Resultset.Tables[0].Rows.Count > 0)
            {
                idInserted = Convert.ToInt32(this.Resultset.Tables[0].Rows[0][0]);
            }
        }

        private DataSet _resultset;
        private MetodoPagoZona _metodoPagoZona;

        public MetodoPagoZona MetodoPagoZona
        {
            get { return _metodoPagoZona; }
            set { _metodoPagoZona = value; }
        }

        public DataSet Resultset
        {
            get { return _resultset; }
            set { _resultset = value; }
        }
    }
}
